package com.coffee.admin.service.supplier.dao;

import com.coffee.admin.api.supplier.query.SupplierPermissionQuery;
import com.coffee.admin.service.supplier.bean.SupplierPermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SupplierPermissionDao {
    public SupplierPermission findById(Integer id);

    public SupplierPermission findByIdForUpdate(Integer id);

    public List<SupplierPermission> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") SupplierPermissionQuery param);

    public List<SupplierPermission> page(@Param("param") SupplierPermissionQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<SupplierPermission> list(@Param("param") SupplierPermissionQuery param);

    public SupplierPermission findFirst(@Param("param") SupplierPermissionQuery param);

    public Integer insert(SupplierPermission param);

    Integer insertBatch(List<SupplierPermission> list);

    public void updateById(@Param("param") SupplierPermission param);

    public Integer deleteById(Integer id);

    public Integer deleteByIds(List<Integer> idList);

    List<String> getSupplierPermissionListByRoleIdList(@Param("roleIdList") List<Integer> roleIdList);

}